//#include <linux/device.h> 

/* This is a #define to keep the compiler from merging different
 * instances of the __key variable */
#define class_create(owner, name)    \
({            \
  static struct lock_class_key __key;  \
  __class_create(owner, name, &__key);  \
})


// generate directory in /sys/class/**
/*
use:
    struct class *chrdev_class;
    chrdev_class = class_create(THIS_MODULE, "my_char_dev");

    ...

    class_destroy(chrdev_class);


function:
    /sys/class/my_char_dev

 */
    